dnl macros uses everywhere for printing log information
dnl     M4_LOG(message,lineinfo)
define(\`M4_LOG`\,\``\)
define(\`M4_LOG_LINEINFO`\,\`M4_LOG($1,'\`__FILE__:__LINE__`\')`\)

dnl macros for set M4_LOG, instead of low-level defining M4_LOG
define(\`SETLOGGER`\,\`define(\`M4_LOG`\,\`$1`\)`\)
SETLOGGER(M4_DEF_LOGGER)

dnl assertion
dnl     ASSERT(condition,failaction,debugname)
define(\`ASSERT`\,\`if (not($1)) then begin M4_LOG_LINEINFO('assertion faild: '+M4_IFFIRST($3,$3+' (not $1)','not $1'))M4_IFFIRST($2,; $2) end;`\)
